package com.example.express_order.controller;


import com.example.express_order.domain.Order;
import com.example.express_order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("open-order")
public class OrderOpenController {

    @Autowired
    OrderService orderService;
    /**
     * 通过GPS和快递类型查询
     *
     */
    @RequestMapping("find-orders-by-express-detail-address")
    public List<Order> findOrdersByExpressDetailAddress(String expressDetailAddress, String expressType){
        return orderService.findOrdersByExpressDetailAddress(expressDetailAddress,expressType);

    }
    /**
     * 搜索框搜索
     */
    @RequestMapping("find-order-by-search")
    public List<Order> findOrderBySearch(String searchContent,String param){
        return orderService.findOrderBySearch(searchContent,param);
    }

}
